<?php
// mall组件
include_once "conn.php";
$arr=[];
$sql=$db->query("SELECT DISTINCT  goods_type FROM goods");
while ($row=$sql->fetch_assoc()) {
    array_push($arr,$row);
}
echo json_encode($arr);
$db->close();
?>